package com.linchong.xshop.service;

import com.linchong.xshop.dto.ProductCategoryExecution;
import com.linchong.xshop.entity.ProductCategory;
import com.linchong.xshop.exceptions.ProductCategoryOperationException;

import java.util.List;

/**
 * @BelongsProject:xshop
 * @BelongsPackage:com.linchong.xshop.service
 * @Author:linchong
 * @CreateTime:2018-08-05 12:48
 * @Description:商品类别dao层接口
 */
public interface ProductCategoryService {

    /**
     * 查询指定某个店铺下所有商品类别信息
     * @param shopId
     * @return
     * @throws ProductCategoryOperationException
     */
    List<ProductCategory> getProductCategoryList(long shopId);

    /**
     * 批量添加某个店铺下的类别信息
     * @param productCategoryList
     * @return
     * @throws ProductCategoryOperationException
     */
    ProductCategoryExecution batchAddProductCategory(List<ProductCategory> productCategoryList)
        throws ProductCategoryOperationException;

    /**
     * 将此类别下的商品中的类别置为空，再删除该商品类别
     * @param productCategoryId
     * @param shopId
     * @return
     * @throws ProductCategoryOperationException
     */
    ProductCategoryExecution deleteProductCategory(long productCategoryId,long shopId)
        throws ProductCategoryOperationException;

}
